package com.j1cn.medical.manage.biz.impl;

import com.j1cn.medical.manage.biz.UserService;
import com.j1cn.medical.manage.dao.entity.SysUser;
import com.j1cn.medical.manage.dao.repository.SysUserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Optional;

/**
 * @author ：ernest.
 * @date ：Created in 2019/03/28 18:10
 * @description：
 * @modified by：
 */
@Service
public class UserServiceImpl implements UserService {

    @Autowired
    private SysUserRepository userRepository;
    @Override
    public Optional<SysUser> getByUserName(String username) {
        return Optional.ofNullable(userRepository.getByUserName(username));
    }
}
